package com.ruoyi.kiku.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kiku.mapper.KikuDeedsMapper;
import com.ruoyi.kiku.domain.KikuDeeds;
import com.ruoyi.kiku.service.IKikuDeedsService;

/**
 * 小鞠事迹Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
@Service
public class KikuDeedsServiceImpl implements IKikuDeedsService 
{
    @Autowired
    private KikuDeedsMapper kikuDeedsMapper;

    /**
     * 查询小鞠事迹
     * 
     * @param id 小鞠事迹主键
     * @return 小鞠事迹
     */
    @Override
    public KikuDeeds selectKikuDeedsById(Long id)
    {
        return kikuDeedsMapper.selectKikuDeedsById(id);
    }

    /**
     * 查询小鞠事迹列表
     * 
     * @param kikuDeeds 小鞠事迹
     * @return 小鞠事迹
     */
    @Override
    public List<KikuDeeds> selectKikuDeedsList(KikuDeeds kikuDeeds)
    {
        return kikuDeedsMapper.selectKikuDeedsList(kikuDeeds);
    }

    /**
     * 新增小鞠事迹
     * 
     * @param kikuDeeds 小鞠事迹
     * @return 结果
     */
    @Override
    public int insertKikuDeeds(KikuDeeds kikuDeeds)
    {
        kikuDeeds.setCreateTime(DateUtils.getNowDate());
        return kikuDeedsMapper.insertKikuDeeds(kikuDeeds);
    }

    /**
     * 修改小鞠事迹
     * 
     * @param kikuDeeds 小鞠事迹
     * @return 结果
     */
    @Override
    public int updateKikuDeeds(KikuDeeds kikuDeeds)
    {
        kikuDeeds.setUpdateTime(DateUtils.getNowDate());
        return kikuDeedsMapper.updateKikuDeeds(kikuDeeds);
    }

    /**
     * 批量删除小鞠事迹
     * 
     * @param ids 需要删除的小鞠事迹主键
     * @return 结果
     */
    @Override
    public int deleteKikuDeedsByIds(Long[] ids)
    {
        return kikuDeedsMapper.deleteKikuDeedsByIds(ids);
    }

    /**
     * 删除小鞠事迹信息
     * 
     * @param id 小鞠事迹主键
     * @return 结果
     */
    @Override
    public int deleteKikuDeedsById(Long id)
    {
        return kikuDeedsMapper.deleteKikuDeedsById(id);
    }
}
